package com.bilibili.dao;

import java.util.List;

import com.bilibili.dto.CommentInfo;
import com.bilibili.entity.Comment;

public interface CommentDao {
	public int selectCountByVId(int videoId);

	public List<Comment> selectAllByVId(int videoId);

	public List<Comment> selectAllByUpId(int upId);

	boolean deleteComment(int commentId);

	/**
	 * 通过视频id查询视频评论量
	 * 
	 * @param videoId 视频id
	 * @return 视频评论量
	 */
	int selectVideoPlayNum(int videoId);

	/**
	 * 查询所有评论总数
	 * 
	 * @return 评论总数
	 */
	int selectAllCommentNum();

	int insertComment(Comment comment);

	 List<Comment> selectCommentsByVideoId(int videoId, int offset, int limit);
	 
	 List<Comment> selectRepliesByParentId(int parentId);
	    
	 Comment selectCommentById(int commentId);
	    
	 int updateCommentLikeCount(int commentId, int likeCount);


	List<CommentInfo> selectAllCommentInfoB(CommentInfo ci,int pageNum,int pageSize);
	
	int selectAllCommentInfoBNum(CommentInfo ci);
	
	int deleteCommentInfoByCId(Comment c);
	
}
